<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<title></title>
		<link rel="stylesheet" href="Public/css/bootstrap.css" />
		<link rel="stylesheet" href="Public/css/swiper.min.css" />
		<link rel="stylesheet" href="Public/css/index.css" />
		<link rel="stylesheet" href="Public/css/model.css" />
		<link rel="stylesheet" href="Public/css/api.css" />
		
	</head>
	<body id="wrap">
		<ul class="nav">
			<a class="active" href="#">首页</a>
			<a href="index.php?c=index&a=allGood">全部商品</a>
			<a href="index.php?c=index&a=shaidan">晒单</a>
			<a href="index.php?c=index&a=wode">个人中心</a>
		</ul>
		
		<!-- 轮播图-->
		<div class="header" id="slide">		    
	    <div class="swiper-container" id="swiper-container">
		    <div class="swiper-wrapper">    
				    <?php if(is_array($adList)): $i = 0; $__LIST__ = $adList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ad): $mod = ($i % 2 );++$i;?><div  class="swiper-slide" data-hash="slide2" ><img src=<?php echo ($ad["pic_images"]); ?> /></div><?php endforeach; endif; else: echo "" ;endif; ?>
		    </div>
		    <div class="swiper-pagination" id="swiper-pagination"></div>
	    </div>
    </div>
    
    <h4>最新揭晓<a>全部</a></h4>
		<div class="goods margin_b flex-wrap m-round " id="lasttime">
		     <div class="listyle newsJ">
					<img src='../img/grey.gif' alt="" /> 
					
					<div class="times" style="width:100%">
					    <span class="mini">00</span><span class="dian" style="display: none">:</span>
					    <span class="sec">00</span><span class="dian" style="display: none">:</span>
					    <span class="hm">00</span>
					</div>
		     </div>
		    	
			
		</div>
		<h4>新品推荐<a>全部</a></h4>
		<div class="goods color_b flex-wrap m-round" id="remmon">
			<?php if(is_array($newList)): $i = 0; $__LIST__ = $newList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$newItem): $mod = ($i % 2 );++$i;?><div  class="listyle xinping" >
					<img  data-original=<?php echo ($newItem["pic_master_img"]); ?> src="Public/img/img_blank.png" class="lazy" alt="" /> 
					<p class="nowrow" style="font-size:12px;color:#393939;margin-top:5px;"><?php echo ($newItem["name"]); ?></p>
					
				</div><?php endforeach; endif; else: echo "" ;endif; ?>
		
		</div>
    
    <div class="goodtitle">
    	<span>今日热门商品</span>
    	<span>更多</span>
    </div>
    <div class="goodsContainer">
    	<?php if(is_array($goodList)): $i = 0; $__LIST__ = $goodList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$good): $mod = ($i % 2 );++$i;?><div class="goodsModel clear" data=<?php echo ($good["fk_number"]); ?>>
		       <div class="modelPic">
		          <img data-original=<?php echo ($good["pic_master_img"]); ?> src="Public/img/img_blank.png" class="lazy" alt="图片"/>
		       </div>
		        <p class="goodsDes"><?php echo ($good["name"]); ?></p>
		        <div>
		            <div class="left_container">
		                <span style="color:#999">揭晓进度<span class="jindu"><?php echo ($good["percentage"]); ?>%</span></span>
		                <div class="progress">
						           <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width:<?php echo ($good["percentage"]); ?>%">
						           </div>
					          </div>
		            </div>
		            <img class="addShoppingCar" src="Public/img/add.png"/>
		        </div>
		    </div><?php endforeach; endif; else: echo "" ;endif; ?>
	    
    </div>
    
    <div class="showmore">点击查看更多商品</div>
    <script type="text/javascript" src="Public/js/jquery-2.1.0.js" ></script>
    <script type="text/javascript" src="Public/js/swiper.min.js" ></script>
    <script type="text/javascript" src="Public/js/util/TimeCountTime.js" ></script>
    <script type="text/javascript" src="Public/js/model/home.js" ></script>
    <script type="text/javascript" src="Public/js/common.js" ></script>
    <script type="text/javascript" src="Public/js/util/jquery.lazyload.js" ></script>
    <script>
       var $swiper_container = document.getElementById('swiper-container');
       $swiper_container.style.height=window.innerWidth*(3/8)+'px';
       var mySwiper = new Swiper('.swiper-container',{
			    pagination: '.swiper-pagination',
			    loop:true,
			    grabCursor: true,
			    paginationClickable: true,
			   
			 });
			 
		var $goodsModel = $('.goodsModel');
		$goodsModel.each(function(){
			var _this = $(this);
			_this.click(function(){
				var period = _this.attr('data');
				window.location.href = "index.php?c=periods&a=getDetail&periods="+period;
			})
		})
		
		
    </script>
	</body>

</html>